package cn.iocoder.yudao.module.member.controller.app.siteconfig;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
import cn.iocoder.yudao.module.member.controller.admin.siteconfig.vo.SiteConfigurationVo;
import cn.iocoder.yudao.module.member.service.siteconfiguration.SiteConfigurationService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "前端 - 前端站点配置")
@RestController
@RequestMapping("/member/site/configuration")
@Validated
public class SiteConfigController {


    @Resource
    private SiteConfigurationService siteConfigurationService;


    @GetMapping("/get")
    @Operation(summary = "获得前端站点配置")
    public CommonResult<SiteConfigurationVo> getConfig() {
        SiteConfigurationVo config = siteConfigurationService.getConfig();
        return success(config);
    }

}
